var dataSource = new Array();
//table的数据源
var table;   //table对象
dataSource = [];
var validCode=true;//短信验证
/*

普通会员

*/

//初始化客户归属下拉列表
function ascription() {
    var user_data = {
    }
    var succCallBack = function (data, status, response) {
        //console.log(data)
        if(data.errorCode=="0") {
            var dataInter=data.group;
            var interText = doT.template($("#ascription_bob").text());
            $("#ascription_lsit").html(interText(dataInter));
        }
    };
    return web.doAjax(root.inter.getGroup, 'post', user_data, succCallBack);
}


function searchsdfs() {
    //渠道
    var channels=null
    if($("#ordinaryChannels").is(':checked')==true){
            channels=null
    }else {
        if($("input:checkbox[name='ordinaryChannel']:checked").val()==undefined){
            channels=null
        }else {
            channels=$("input:checkbox[name='ordinaryChannel']:checked").val()
        }

    }
    $.ajax({
        url:root.member.adminMember2CList,
        cache: false,  //禁用缓存
        type: "POST",
        dataType:'json',
        contentType: "application/json",
        data: JSON.stringify({
            "pageNum":1,
            "pageSize":20,

            "accountType":"20",
            "loginAccount":$("#login_account").val(),

            "mobilePhone":$("#mobile_phone").val(),
            "status":$("#status").val(),
            "registerPlatform":$("#registerPlatform").val(),

            "regBeginTime":$("#register_time").val(),
            "regEndTime":$("#last_change_time").val(),
            "companyId":$("#ascription_lsit").val(),
            "channelSource":channels,
        }),
        success: function (data) {
            // couponlist(data.result);
            couponlist(data.list, 0);
            $('.M-box3').pagination({
                pageCount: data.totalPage,
                jump: true,
                coping: true,
                prevContent: '上页',
                nextContent: '下页',
                callback: function (api) {
                    $.ajax({
                        /* root.member.adminMember2CList*/
                        url: root.member.adminMember2CList,
                        cache: false,  //禁用缓存
                        type: "POST",
                        dataType:'json',
                        contentType: "application/json",
                        data: JSON.stringify({
                            "pageNum":api.getCurrent(),
                            "pageSize":20,

                            "accountType":"20",
                            "loginAccount":$("#login_account").val(),

                            "mobilePhone":$("#mobile_phone").val(),
                            "status":$("#status").val(),
                            "registerPlatform":$("#registerPlatform").val(),

                            "regBeginTime":$("#register_time").val(),
                            "regEndTime":$("#last_change_time").val(),
                            "companyId":$("#ascription_lsit").val(),
                            "channelSource":channels,

                        }),
                        success: function (result) {
                            couponlist(result.list);
                        },
                        error: function (XMLHttpRequest, textStatus, errorThrown) {
                            alert(XMLHttpRequest);
                        }
                    });
                }
            });

        },
        error: function () {
            $.Huimodalalert('失败！',2000);
        }
    });
}

// var j = 0;
function couponlist(data, index){

    // var j = 0;
    sessionStorage.setItem("authorizedUsers", JSON.stringify(data));
    dataSource.splice(0,dataSource.length);//清空数组


    if(data !=null && data != ''){
        var datashu =data[0].rowNo;


    $.each(data, function (i, field) {
        var datashus = datashu++
        var rowData = new Array();
        rowData.push(field.member_id);
        rowData.push(field.login_account);
        rowData.push(field.mobile_phone);
        rowData.push(field.register_platform);
        rowData.push(field.register_time_value);
        rowData.push(field.status);
        rowData.push(datashus);
        rowData.push(field.company_name);
        rowData.push(field.channel_source);
        rowData.push(field.bind_status);
        rowData.push(field.authFlag);
        dataSource.push(rowData);

    });
    }
    initDataTable(dataSource);

    function initDataTable(dataSource) {

        var dttable = $('#dsfsdgdf').dataTable(); // 初始化dataTable，清空上一个值
        dttable.fnClearTable(); //清空一下table
        dttable.fnDestroy(); //还原初始化了的datatable
        $("#dsfsdgdf").DataTable({
            // "order": false,
            "autoWidth": false,
            "ordering": false,
            "searching": false,
            "paging": false,
            "retrieve": true,
            "destroy": true,
            "bAutoWidth": true,
            "bLengthChange": true,
            "aLengthMenu": false,
            "oLanguage": {
                "sLengthMenu": "每页显示 _MENU_ 条记录",
                "sZeroRecords": "抱歉， 没有找到",
                "sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据",
                "sInfoEmpty": "没有数据",
                "sInfoFiltered": "(从 _MAX_ 条数据中检索)",
                "oPaginate": {
                    "sFirst": "首页",
                    "sPrevious": "前一页",
                    "sNext": "后一页",
                    "sLast": "尾页"
                },
                "sZeroRecords": "没有检索到数据",
            },
            data: dataSource,
            columnDefs: [
                {
                    "visible": true,
                    "targets": 0
                },
                {
                    "render": function (data, type, row, meta) {
                        var val = row[6]
                        if (val == undefined) {
                            val = ''
                        }
                        return val;
                    },
                    "targets": 0
                },



                {
                    "render": function (data, type, row, meta) {
                        var val = '';
                        if(row[3]==10){
                            val='PC端'
                        }
                        else if(row[3]==20){
                            val='Andriod端'
                        }
                        else if(row[3]==30){
                            val='IOS端'
                        }
                        else if(row[3]==40){
                            val='H5端'
                        }
                        else if(row[3]==50){
                            val='云采后台'
                        }else if(row[3]==60){
                            val='小程序端'
                        }
                        return val;
                    },
                    "targets":3
                },
                {
                    "render": function (data, type, row, meta) {
                        var val = row[7]
                        if (val == undefined) {
                            val = ''
                        }
                        return val;
                    },
                    "targets": 4
                },
                {
                    "render": function (data, type, row, meta) {
                        var val = '';
                        // console.log(row[4]);
                        var date = row[4];
                        var split = date.split(" ");
                        val = split[0] + '<br/>' + split[1];
                        return val;
                    },
                    "targets":5
                },

                {
                    "render": function (data, type, row, meta) {
                        var val = '';
                        if(row[8]==10){
                            val='云采'
                        } else if(row[8]==20){
                            val='门店触摸屏'
                        }else if(row[8]==null){
                            val=''
                        }
                        return val;
                    },
                    "targets":6
                },

                {
                    "render": function (data, type, row, meta) {
                        var val = '';
                        if(row[5]==10){
                            val='开启&nbsp;&nbsp;<a class="powerButton 183" style="margin-right: 20px"><span class="list" id="'+row[0]+'" onclick="Closes('+row[0]+')">关闭</span></a>'
                        }
                        else if(row[5]==20){
                            val='关闭&nbsp;&nbsp;<a class="powerButton 183" style="margin-right: 20px"><span class="list" id="'+row[0]+'" onclick="opens('+row[0]+')">开启</span></a>'
                        }else if(row[5]==30){
                            val='已注销'
                        }
                        return val;
                    },
                    "targets":7
                },

                {
                    "render": function (data, type, row, meta) {
                        var val='';
                        var authFlags=""
                        if(row[10]==true){
                            authFlags='<a style="margin-right: 10px"><span class="list" onclick="certificationaudit(\''+row[0]+'\',\''+row[1]+'\')">申请认证</span></a>'
                        }else {
                            authFlags=""
                        }
                        if(row[5]==30){
                            val = '<div class="action" id="action'+row[0]+'">'+
                                '<a class="powerButton 184"><span class="list"  onclick="detail(\'会员\',\'commomCustomer_see.html\',\''+row[0]+'\')">查看</span></a></div>';
                        }else {
                            val = '<div class="action" id="action'+row[0]+'">'+
                                '<a class="powerButton 184" style="margin-right: 10px"><span class="list"  onclick="detail(\'会员\',\'commomCustomer_see.html\',\''+row[0]+'\')">查看</span></a>&nbsp;&nbsp;<a class="powerButton 514" style="margin-right: 10px"><span class="list" name="'+row[1]+'" onclick="cancellation(\''+row[0]+'\',\''+row[1]+'\')"">账号注销</span></a>'+authFlags+'</div>';
                        }
                        return val;
                    },
                    "targets":8
                }


            ]
        });
//权限控制函数
        power()
    };
}
//关闭弹框
var index=0;
function Closes(id,val) {
    var curInd = layer.confirm('<span id="status" style="width:200px;height:100px;resize: none;" maxlength="200" >您确定要关闭此账号吗？</span>', {title:'提示',btn: ['确定', '取消']}, function(index){

        Closes1(id,curInd,val)
        layer.close(curInd);
    },function(){
        layer.close(curInd);

    });
}
//第一个
function Closes1(id,val){
    var target = document.getElementById(''+id+'');
    target.parentElement.parentElement.parentElement.previousElementSibling.innerHTML='关闭';
    console.log(target)

    var reason=$('#reason'+id+'').val();
    console.log(reason)
    if(reason!=''){
        $.ajax({
            contentType: "application/json;charset=UTF-8",
            /*root.member.updateMemberStatus*/
            url:root.member.updateMemberStatus,
            cache: false,  //禁用缓存
            type: "POST",
            dataType:'json',
            data: JSON.stringify({
                "memberId":id,
                "status":20,
                optUserId:JSON.parse(decodeURIComponent(web.readCookie("loginData"))).user.user_ID,
                optUserName:JSON.parse(decodeURIComponent(web.readCookie("loginData"))).user.name

            }),
            success: function (data) {
                console.log(data)

                target.onclick = null;
                target.setAttribute("onclick", 'confirm('+id+')')
                target.parentElement.parentElement.parentElement.previousElementSibling.innerHTML='关闭'
                searchsdfs();

            },
            error: function () {
                $.Huimodalalert('失败！',2000);
            }
        })}
    else{
        $.Huimodalalert('处理结果不能为空！',2000);
    };
    layer.close(index);
}

//开启弹框
var index=0;
function opens(id,val) {
    var curInd = layer.confirm('<span id="status" style="width:200px;height:100px;resize: none;" maxlength="200" >您确定要开启此账号吗？</span>', {title:'提示',btn: ['确定', '取消']}, function(index){

        opens2(id,curInd,val)
        layer.close(curInd);
    },function(){
        layer.close(curInd);

    });
}
//第一个
function opens2(id,val){
    var target = document.getElementById(''+id+'');

    target.parentElement.parentElement.parentElement.previousElementSibling.innerHTML='开启';

    var reason=$('#reason'+id+'').val();
    if(reason!=''){
        $.ajax({
            contentType: "application/json;charset=UTF-8",
            /*root.member.updateMemberStatus*/
            url:root.member.updateMemberStatus,
            cache: false,  //禁用缓存
            type: "POST",
            dataType:'json',
            data: JSON.stringify({
                "memberId":id,
                "status":10,
                optUserId:JSON.parse(decodeURIComponent(web.readCookie("loginData"))).user.user_ID,
                optUserName:JSON.parse(decodeURIComponent(web.readCookie("loginData"))).user.name

            }),
            success: function (data) {

                target.onclick = null;
                target.setAttribute("onclick", 'confirm('+id+')')
                searchsdfs();
            },
            error: function () {
                $.Huimodalalert('失败！',2000);
            }
        })}
    else{
        $.Huimodalalert('处理结果不能为空！',2000);
    };
    layer.close(index);
}

//查看详情
function detail(title,url,member_id) {
    sessionStorage.setItem("member_id",member_id);
    var index = layer.open({
        type: 2,
        title: title,
        content: url
    });
    layer.full(index);
}


//账号注销
function cancellation(id,val) {
    var curInd = layer.confirm('<span id="status" style="width:200px;height:100px;resize: none;" maxlength="200" >确定要注销此账号吗？</span>', {title:'提示',btn: ['确定', '取消']}, function(index){

        cancellation2(id,val)
        layer.close(curInd);
    },function(){
        layer.close(curInd);

    });
}
//第一个
function cancellation2(id,val){
        $.ajax({
            contentType: "application/json;charset=UTF-8",
            url:root.member.cancelAccount,
            cache: false,  //禁用缓存
            type: "POST",
            dataType:'json',
            data: JSON.stringify({
                "member_id":id,
                "login_account":val,
                /*optUserId:JSON.parse(decodeURIComponent(web.readCookie("loginData"))).user.user_ID,
                optUserName:JSON.parse(decodeURIComponent(web.readCookie("loginData"))).user.name*/

            }),
            success: function (data) {
                if(data.errorCode==0){
                    $.Huimodalalert('注销成功！',2000);
                   /* var target = document.getElementsByName(''+val+'');
                    $(target).attr("style","color:#aaaaaa")
                    $(target).attr("onclick","")//置灰*/
                    searchsdfs();
                }else {
                    $.Huimodalalert(data.msg,2000);

                }
            },
            error: function () {
                $.Huimodalalert('失败！',2000);
            }
        })
    layer.close(index);
}
//全选全不选
function ordinaryChannelss() {
    if($("#ordinaryChannels").is(':checked')==true){
        var ordinaryChannel=$("input:checkbox[name='ordinaryChannel']")
        for(var i = 0; i < ordinaryChannel.length; i++) {
            ordinaryChannel[i].checked = true;
        }
    }else {
        var ordinaryChannel=$("input:checkbox[name='ordinaryChannel']")
        for(var i = 0; i < ordinaryChannel.length; i++) {
            ordinaryChannel[i].checked = false;
        }
    }

}
//子级选中
ordinaryChannelall()
function ordinaryChannelall() {
    var ordinaryChannel=$("input:checkbox[name='ordinaryChannel']")
    var ordinaryChannel2=$("input:checkbox[name='ordinaryChannel']:checked")
    if(ordinaryChannel2.length==ordinaryChannel.length){
        $("#ordinaryChannels").prop("checked", true)
    }else {
        $("#ordinaryChannels").prop("checked", false)
    }
}
//formdata上传图片公用方法
//触发事件
var licencePicPaths=""
function addBtn(cen,ir) {
    $(cen).prev().trigger('click');
}
var formData = new FormData();
// 提交上传图片
function getupfilerul(can,e){
    var formData = new FormData();
    formData.append('file',$(can)[0].files[0]);
    $.ajax({
        url: root.inter.imgUpload,
        cache: false,  //禁用缓存
        type: "POST",
        // 告诉jQuery不要去处理发送的数据
        processData : false,
        // 告诉jQuery不要去设置Content-Type请求头
        contentType : false,
        data: formData,
        success: function (data) {
            licencePicPaths=data[0].fullPath
            for(var i=0; i<data.length; i++){
                $(can).prev().val(data[0].reletivePath)
                $(can).prev().text(data[0].reletivePath)
            }
        }
    })
}
// 上传图片返现
function putDataToPage(e,can) {
    verificationPicFileType(can)
    verificationPicFileSize(can)
    for(var i = 0; i < e.target.files.length; i++) {
        var file = e.target.files.item(i);
        if(!(/^image\/.*$/i.test(file.type))) {
            continue; //不是图片 就跳出这一次循环
        }


        //实例化FileReader API
        var freader = new FileReader();
        freader.readAsDataURL(file);
        freader.onload = function (e) {
            $(can).parent().prev().children().attr("src", e.target.result);
            $(can).next().text('重新上传')
            getupfilerul(can,e)
        }
    }
    formData.append('file', $(can)[0].files[0]);
}
// 图片类型验证
function verificationPicFileType(file) {
    var flag=false;
    var fileTypes = [".jpg", ".png",".jpeg"];
    var filePath = file.value;
    //当括号里面的值为0、空字符、false 、null 、undefined的时候就相当于false
    if(filePath){
        var isNext = false;
        var fileEnd = filePath.substring(filePath.indexOf("."));
        for (var i = 0; i < fileTypes.length; i++) {
            if (fileTypes[i] == fileEnd) {
                isNext = true;
                flag= true;
                break;
            }
        }
        if (!isNext){
            $.Huimodalalert('不接受此类型，请上传jpg,png,jpeg格式',2000);
            file.value = "";
            flag=false;
        }
    }
    return flag;
}
//图片大小验证
function verificationPicFileSize(file) {
    var flag=false;
    var fileSize = 0;
    var fileMaxSize = Number(200);
    var filePath = file.value;
    if(filePath){
        fileSize =file.files[0].size;
        if(fileSize>5*1024*1024){
            $.Huimodalalert('请上传5M以内的图片',2000);
            file.value = "";
            flag=false;
        }else{
            flag=true;
        }
    }
    return flag;
}
//添加
function increases() {
    $("#increases").modal("show")
    //默认个人
    $("#member1").prop("checked",true)
    $(".essentialinformation").val("")
    retime=false
    $(".enterprises").css({
        display: "none"
    })
    //清空数值
    $("#mobile").val(""),
        $("#veryfyCode").val(""),
        $("#inviteCode").val(""),
        $("#companyInfoName").val(""),
        $("#businessLicenseNum").val(""),
        licencePicPaths=""
    $("#photosrc").attr("src","");
    $("#companyNames").text("")
    $("#companyNames").val("")
}
//新增会员
function increases_save() {
    console.log()
    var user_data = {}
    var rooturl=''
    if($("#mobile").val()==""){
        $.Huimodalalert('请填写注册手机号',2000);
        return false;
    }
    if($("#veryfyCode").val()==""){
        $.Huimodalalert('请填写短信验证码',2000);
        return false;
    }

    if($("input[name='memberInformation']:checked").val()==20){
        // 个人会员
        user_data = {
            "registerPlatform":50,
            "mobile": $("#mobile").val(),
            "veryfyCode": $("#veryfyCode").val(),
            "inviteCode": $("#inviteCode").val(),
            "userCode": JSON.parse(decodeURIComponent(web.readCookie("loginData"))).user.number,
            "createUser": JSON.parse(decodeURIComponent(web.readCookie("loginData"))).user.name,
            "pushmanCompanyId":$("#companyNames").text(),
            "companyName":$("#companyNames").val(),
        }
        rooturl=root.member.adminMemberRegistration
    }else {
        if($("#companyInfoName").val()==""){
            $.Huimodalalert('请填写公司名称',2000);
            return false;
        }
        if($("#businessLicenseNum").val()==""){
            $.Huimodalalert('请填写营业执照注册号',2000);
            return false;
        }
        user_data = {
            "registerPlatform":50,
            "mobile": $("#mobile").val(),
            "veryfyCode": $("#veryfyCode").val(),
            "inviteCode": $("#inviteCode").val(),
            "userCode": JSON.parse(decodeURIComponent(web.readCookie("loginData"))).user.number,
            "createUser": JSON.parse(decodeURIComponent(web.readCookie("loginData"))).user.name,
            "companyInfoName":$("#companyInfoName").val(),
            "businessLicenseNum":$("#businessLicenseNum").val(),
            "licencePicPath":licencePicPaths,
            "pushmanCompanyId":$("#companyNames").text(),
            "companyName":$("#companyNames").val(),
        }
        rooturl=root.member.adminCompanymemberRegistration
    }

    var succCallBack = function (data, status, response) {
        if(data.errorCode=="0"){
            layer.msg('新增成功', {icon: 6,time:1000});
            setTimeout( function () {
                $("#increases").modal("hide")
                searchsdfs()
            },1000);
        }else {
            layer.msg(data.msg, {icon: 5,time:1000});
        }
    };
    web.doAjax(rooturl,'post',user_data, succCallBack,1);
}
var retime=true//重新计时
//取消
function commom_close() {
    $("#increases").modal("hide")
    $(".essentialinformation").val("")
    $("#member1").prop("checked", true)
    retime=false
    $("#uploadimg").html("上传")
    $("#photosrc").attr("src","")

}

//会员类型切换
function memberInformations(val) {
    $("#companyNames").text("")
    $("#companyNames").val("")
    if(val==1){
        //个人
        $(".essentialinformation").val("")
        retime=false
        $(".enterprises").css({
            display: "none"
        })
    }else if(val==2){
        //企业
        $(".essentialinformation").val("")
        retime=false
        $(".enterprises").css({
            display: "block"
        })
        $("#uploadimg").html("上传")
        $("#photosrc").attr("src","")

    }
}
// 短信倒计时
function verificationCodes(ceder) {
    retime=true
    var code=$(ceder);
    if($("#mobile").val()==''){
        $.Huimodalalert('手机号码不能为空',2000);
        validCode=true;
        return false;
    };
        var time=120;
        console.log(validCode)
        if (validCode) {
            validCode=false;
            // 走发送验证码接口
            var user_data = {
                mobile:$("#mobile").val(),
                templateId:3,
                veryfyType:1,
                member_id:"",
                account_type:"",
                token:"",
                timestamp: "",
            device_platform: "",
            customer_id:"",
                customer_code:"",
                    sign: "",
            };
            var succCallBack = function (data, status, response) {
                if(data.errorCode=="0"){
                    var t=setInterval(function  () {
                        if(retime==true){
                            time--;
                            code.val(time+"s");
                            if (time==0) {
                                clearInterval(t);
                                code.val("重新获取");
                                validCode=true;
                            };
                        }else {
                            code.val("获取验证码");
                            validCode=true;
                            time=120
                        }

                    },1000);
                }else {
                    $.Huimodalalert(data.errorMessage,2000);
                    validCode=true;
                    return false
                }
            }
            web.doAjax(root.publics.getSmsVerifyCodeComm,'post',user_data, succCallBack);

        };


};

//会员归属
function gongsi(){
    var user_data = {

    }
    var succCallBack = function (data, status, response) {
        $("#companyNames").text("")
        if(data.errorCode=="0"){
            var jsonObj =data.group;
            if(jsonObj==""){
                $("#tuank").html("<li>无数据</li> ");
            }else {
                var optionstring = "";
                for (var  i= 0; i < jsonObj.length; i++) {
                    optionstring += "<li  onclick='relation("+ jsonObj[i].id+",\""+jsonObj[i].organization_name+"\")' data-align=\"" + jsonObj[i].id + "\" > " + jsonObj[i].organization_name + "</li>";
                }
                $("#tuank").html(optionstring);
                $("#tuank").show()

            }
        }else{
            $("#tuank").html("<li>无数据</li> ");
        }
    }
    /*root.member.getGroup*/
    web.doAjax(root.member.getGroup,'post',user_data, succCallBack);

}
$(document).bind("click",function(e){
    //id为menu的是菜单，id为open的是打开菜单的按钮
    if($(e.target).closest("#tuank").length == 0 && $(e.target).closest("#companyNames").length == 0){
        //点击id为menu之外且id不是不是open，则触发
        $("#tuank").hide()
    }
})
function relation(id,ce) {
    $("#companyNames").val(ce).text(id)
    $("#tuank").hide()
}

var licencePicPathall=""
function addBtn2(cen,ir) {
    $(cen).prev().trigger('click');
}
function getupfilerul2(can,e){
    var formData = new FormData();
    formData.append('file',$(can)[0].files[0]);
    $.ajax({
        url: root.inter.imgUpload,
        cache: false,  //禁用缓存
        type: "POST",
        // 告诉jQuery不要去处理发送的数据
        processData : false,
        // 告诉jQuery不要去设置Content-Type请求头
        contentType : false,
        data: formData,
        success: function (data) {
            licencePicPathall=data[0].fullPath
            for(var i=0; i<data.length; i++){
                $(can).prev().val(data[0].reletivePath)
                $(can).prev().text(data[0].reletivePath)
            }
        }
    })
}
// 上传图片返现
function putDataToPage2(e,can) {
    for(var i = 0; i < e.target.files.length; i++) {
        var file = e.target.files.item(i);
        if(!(/^image\/.*$/i.test(file.type))) {
            continue; //不是图片 就跳出这一次循环
        }


        //实例化FileReader API
        var freader = new FileReader();
        freader.readAsDataURL(file);
        freader.onload = function (e) {
            $(can).parent().prev().children().attr("src", e.target.result);
            $(can).next().text('重新上传')
            getupfilerul2(can,e)
        }
    }
    formData.append('file', $(can)[0].files[0]);
}
//申请认证
function certificationaudit(id,loginaccount){
    $("#certificationaudit").modal("show")
    $("#loginaccount").html(loginaccount)
    $("#memberIds").html(id)
    $("#businessLicenseNums").val("")
    $("#companyInfoNames").val("")
    licencePicPathall=""
    $("#certificationauditsrc").attr("src","");
}
//取消
function certificationauditclose(){
    $("#certificationaudit").modal("hide")
}
//保存申请认证信息
function certificationauditdetermine(){
    var user_data = {
        "businessLicenseNum":$("#businessLicenseNums").val(),
        "companyInfoName":$("#companyInfoNames").val(),
        "licencePicPath":licencePicPathall,
        "loginAccount":$("#loginaccount").html(),
        "memberId":$("#memberIds").html()
    }
    var succCallBack = function (data, status, response) {
        if(data.code == 0){
            $.Huimodalalert('申请认证成功',2000);
            $("#certificationaudit").modal("hide")
            searchsdfs()
        }else {
            $.Huimodalalert(data.msg,2000);
        }
    };
    web.doAjax(root.member.personMemberCertified, 'post', user_data, succCallBack,1);
}